<template>
  <div class="invitorList">
    <h2>
      <i @click="goBack" class="el-icon-back"></i>
      <span>我的邀请好友</span>
    </h2>
    <noCont v-if="isEmpty"></noCont>
    <div class="tables" v-if="!isEmpty">
      <el-table :data="tableData" border>
        <el-table-column prop="userName" label="帐号" align="center">
        </el-table-column>
        <el-table-column prop="gmtCreate" label="注册时间" align="center">
        </el-table-column>
        <el-table-column prop="level" label="用户等级" align="center">
          <template slot-scope="scope">
            <span v-if="scope.row.level == 1">注册用户</span>
            <span v-else-if="scope.row.level == 2">VIP用户</span>
            <span v-else-if="scope.row.level == 10">钻石用户</span>
            <span v-else>--</span>
          </template>
        </el-table-column>
      </el-table>
      <div class="pager">
        <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNo" :page-sizes="pageSizeArray" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="pageTotal">
        </el-pagination>
      </div>
    </div>
  </div>
</template>
<script type="text/ecmascript-6">
import { pageCommon } from '@/assets/js/mixin'
import NoCont from '@/components/base/noCont'
import { mapGetters } from 'vuex'
export default {
  name: 'invitorList',
  mixins: [pageCommon],
  components: {
    NoCont
  },
  computed: {
    params () {
      return {
        requestId: this.userInfo.sellerAccountId,
        pageNo: this.pageNo,
        pageSize: this.pageSize
      }
    },
    ...mapGetters([
      'userInfo'
    ])
  },
  data () {
    return {
      apiUrl: '/api/seller/account/getSellerAccountByRequestId',
      tableData: []
    }
  },
  methods: {
    setList (data) {
      this.tableData = data
    },
    goBack () {
      window.history.go(-1)
    }
  }
}
</script>
<style lang="stylus" rel="stylesheet/stylus" scoped>
.invitorList
  >h2
    display flex
    justify-content space-between
    margin-bottom 20px
    i
      font-size 24px
      cursor pointer
    span
      font-size 22px
      line-height 30px
      color #333333
</style>
